#pragma once

#include "tcservercore_global.h"
#include "Base\AbstractHandler.h"

namespace TCServer
{
	namespace RPHandler
	{
		class TCSERVERCORE_EXPORT DiscoverHandler : AbstractHandler
		{
		private:
			DiscoverHandler();
		public:
			~DiscoverHandler();
		public:
			// handlers for users
			void queryAllNewsGroups(QDataStream &stream, QVariantMap args);
			void queryAllNews(QDataStream &stream, QVariantMap args);
		public:
			// handlers for admin
			void addNewsGroup(QDataStream &stream, QVariantMap args);
			void updateNewsGroup(QDataStream &stream, QVariantMap args);
			void removeNewsGroup(QDataStream &stream, QVariantMap args);
			void addNews(QDataStream &stream, QVariantMap args);
			void updateNews(QDataStream &stream, QVariantMap args);
			void removeNews(QDataStream &stream, QVariantMap args);
		public:
			static DiscoverHandler* instance();
		private:
			static DiscoverHandler* _instance;
		};
	}
}